/**
 * Created by yhg97p on 2016/9/27.
 */
define(['app', 'filters/filters'],function(app){
    app.register.controller('index', function($scope, $http, $state, $sce,$stateParams,$rootScope){
        $scope.sce = $sce.trustAsResourceUrl;
        $scope.id = $stateParams.id;
        $scope.load = {
            _getMajorinfo: function(){  //专业类别和专业
                $http({
                   // url: app._baseUrl + '/Trainhome/Period/getInfo&period_id='+'2',
                    url: app._baseUrl + '/Trainhome/navigation/getCategoryAndSpecialty',
                    method: 'GET',
                    headers: {'Content-Type': 'application/x-www-form-urlencoded'}
                }).success(function(responed){
                    $scope.Majorinfo = responed.data;
                    $rootScope.secondary = false;
                });

            },
            init: function(){
                $scope.Majorinfo = [];
                this._getMajorinfo && this._getMajorinfo();
            }
        };
        $scope.load.init && $scope.load.init();
    })
})